#include <stdio.h>
#include <math.h>

int main(){
	double x,y;
	scanf("%lf %lf", &x, &y);
	printf("%d", fabs(x)<fabs(y)?(int)fabs(x)+1:(int)fabs(y)+1);
	return 0;
}
